<#include "common/main.html">
<#macro bodyId>statistics-agent</#macro>
<#macro content>


<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main ty-common-page">
    <h1 class="page-header">红包汇总报表
        <div class="btns">
        </div>
    </h1>
    <div class="tool-bar">
        <div class="filter">
            <form action="" method="get" class="J_filterForm" id="statistics-form">
                <div class="form-group">
                    <span class="label-text">用户类型：</span>
                    <div class="col7">
                        <select class="form-control" name="type">
                            <option value="">请选择</option>
                            <option value="1" <#if queryDto.type=='1'>selected="true"</#if>>注册用户</option>
                            <option value="2" <#if queryDto.type=='2'>selected="true"</#if>>渠道经理</option>
                            </select>
                    </div>
                    <span class="label-text">所属支行：&nbsp; &nbsp;&nbsp;</span>
                    <div class="col4">
                        <select class="form-control" name="subBankCode">
                            <option value="" <#if queryDto.subBankCode==null>selected="true"</#if> >请选择</option>
                            <#list subBankList as subBank>
                            <option value="${subBank.code}" <#if subBank.code==queryDto.subBankCode>selected="true"</#if> >${subBank.name}</option>
                            </#list>
                         </select>
                    </div>
                    <span class="label-text">是否内部员工：&nbsp; &nbsp;&nbsp;</span>
                    <div class="col7">
                    <select class="form-control" name="tag">
                        <option value="">请选择</option>
                        <option value="1" <#if queryDto.tag=='1'>selected="true"</#if>>否</option>
                        <option value="2" <#if queryDto.tag=='2'>selected="true"</#if>>是</option>
                    </select>
                    </div>
                    <div></div>
                    <br/>
                    <span class="label-text">开始时间：</span>
                    <div class="col6">
                        <input class="form-control J_startDate" name="startTimeStr" value="${queryDto.startTimeStr}" >
                    </div>

                    <span class="label-text">结束时间：&nbsp;&nbsp;&nbsp;&nbsp;</span>
                    <div class="col6">
                        <input class="form-control J_endDate" name="endTimeStr" value="${queryDto.endTimeStr}" >
                    </div>

                    <button type="submit" class="btn btn-success J_getExcel"
                            data-action="${rc.contextPath}/awardStatistics/exportForTotal">红包汇总Excel
                    </button>
                    <button type="submit" class="btn btn-success J_search"
                            data-action="${rc.contextPath}/awardStatistics/totalCount">查询
                    </button>

                </div>

        </form>
    </div>
</div>
    <div class="table-responsive">
        <table class="table table-striped">
            <thead>
            <tr>
                <th>日期</th>
                <th>开启红包个数</th>
                <th>开启红包人数</th>
                <th>领取红包个数</th>
                <th>领取红包金额</th>
                <th>领取红包人数</th>
                <th>已提现金额</th>
                <th>提现人数</th>
            </tr>
            </thead>
            <tbody>
            <#if list??>
            <#list list as awardStatistics>
            <tr>
                <td>${awardStatistics.date}</td>
                <td>
                    <#if awardStatistics.openAwardCount == null>0
                    <#else>
                    ${awardStatistics.openAwardCount}
                    </#if>

                </td>
                <td>
                    <#if awardStatistics.openAwardPersonCount == null>0
                    <#else>
                    ${awardStatistics.openAwardPersonCount}
                    </#if>
                </td>
                <td>
                    <#if awardStatistics.getAwardCount == null>0
                    <#else>
                    ${awardStatistics.getAwardCount}
                </#if>

                </td>

                <td>
                    <#if awardStatistics.getAwardFee == null>0
                    <#else>
                    ${awardStatistics.getAwardFee/100}
                </#if>
                </td>
                <td>
                    <#if awardStatistics.getAwardPersonCount == null>0
                    <#else>
                    ${awardStatistics.getAwardPersonCount}
                    </#if>

                </td>

                <td>
                    <#if awardStatistics.awardOutFee == null>0
                    <#else>
                    ${awardStatistics.awardOutFee/100}
                    </#if>
                </td>
                <td>

                    <#if awardStatistics.awardOutPersonCount == null>0
                    <#else>
                    ${awardStatistics.awardOutPersonCount}
                    </#if>
                </td>
            </tr>
            </#list>
            </#if>
            </tbody>
        </table>
    </div>

</div>

<script>
    var config = {}
</script>

</#macro>

<script>

</script>